package com.aiti.lulian.ocr;

import lombok.Data;

import java.util.List;

/**
 * description: 文档见：https://help.aliyun.com/zh/ocr/developer-reference/api-ocr-api-2021-07-07-recognizebusinesslicense
 * auth fcb
 * date 2025-06-07 11:32
 **/
@Data
public class BusinessLicenseResult {

    private String algo_version;
    private List<Code> codes;
    private Data data;
    private List<Figure> figure;
    private int ftype;
    private int height;
    private int orgHeight;
    private int orgWidth;
    private List<KeyValueInfo> prism_keyValueInfo;
    private SliceRect sliceRect;
    private int width;

    @lombok.Data
    public static class Code {
        private String data;
        private List<Point> points;
        private String type;
    }

    @lombok.Data
    public static class Data {
        private String RegistrationDate;
        private String businessAddress;
        private String businessScope;
        private String companyForm;
        private String companyName;
        private String companyType;
        private String creditCode;
        private String legalPerson;
        private String registeredCapital;
        private String validFromDate;
        private String validPeriod;
        private String validToDate;
    }

    @lombok.Data
    public static class Figure {
        private Box box;
        private int h;
        private List<Point> points;
        private String type;
        private int w;
        private int x;
        private int y;
    }

    @lombok.Data
    public static class Box {
        private int angle;
        private int h;
        private int w;
        private int x;
        private int y;
    }

    @lombok.Data
    public static class Point {
        private int x;
        private int y;
    }

    @lombok.Data
    public static class KeyValueInfo {
        private String key;
        private int keyProb;
        private String value;
        private List<Point> valuePos;
        private int valueProb;

    }

    @lombok.Data
    public static class SliceRect {
        private int x0;
        private int x1;
        private int x2;
        private int x3;
        private int y0;
        private int y1;
        private int y2;
        private int y3;

    }
}
